//
//  CXAFNHttpRequestUtils.h
//  base_test
//
//  Created by  androidlongs on 17/8/15.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, CXHttStatuCode) {
    CXHttStatuCodeSuccess = 1000,
    CXHttStatuCodeNoNet = 1001,
    CXHttStatuCodeFaile = 1002,
    
};


@interface CXAFNHttpRequestUtils : NSObject

    //post请求
    +(void) httpPostRequest:(NSString *) url withParamters:(NSDictionary*) dic success:(void(^)(id responseData)) success failure:(void(^)(NSError* error,NSInteger errCode)) failure;
    //get请求 有参数
    +(void) httpGetRequest:(NSString *) url withParamters:(NSDictionary*) dic success:(void(^)(id responseData)) success failure:(void(^)(NSError* error,NSInteger errCode)) failure;
    //get请求 无参数
    +(void) httpGetRequest:(NSString *) url success:(void(^)(id responseData)) success failure:(void(^)(NSError* error,NSInteger errCode)) failure;
    +(CXAFNHttpRequestUtils * ) sharedHttpRequestUtils;
@end
